<?php
ini_set('display_errors','On');

error_reporting(E_ALL);


include "wechat.class.php";

$tip = "设置菜单";
$options = array (
		'appid' =>'wx2506434984b44fa7',
		'appsecret'=>'093dc1f822d6cb241a00f6455cf8f987',
		'token' => 'mytokentest', // 填写你设定的key
		'encodingaeskey' => '55cf8f987' 
)
// 填写加密用的EncodingAESKey，如接口为明文模式可忽略
;
$weObj = new Wechat ( $options );

$result = $weObj->createMenu ( array (
		'button' => array (
				0 =>  array (
						'type' => 'view',
						'name' => '活动',
						'url' => 'http://junjun.co/weixin-junjun/activity.php' 
				) 
		) 
));

$tip = "菜单已更新~";

header ( "Content-type: text/html; charset=utf-8" );
?>
<h4><?php echo $tip;?></h4>
<p><?php var_dump($result);?></p>

